home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / grafix / raytracing / raylab / scenes / table.rl < prev   
Encoding:
Text File  |  1996-01-04  |  2.7 KB  |  155 lines

  1. #
  2. # This is an example scene for RayLab 1.0
  3. #
  4. # Author:  Marcus Geelnard
  5. # Date:    28-Nov-95
  6. #
  7.  
  8.  
  9. Globals:
  10.     picwidth  640
  11.     picheight 480
  12.     recdepth  5
  13.     backgroundcolor 0 0.2 0.6    ; We want a clear blue sky
  14. :end
  15.  
  16.  
  17.  
  18. **
  19. **  The first object of the scene is a checkered plane
  20. **
  21.  
  22. PLANE:
  23.     normal  0 0 1
  24.     offset  0
  25.     texture:                     ; The surface of the plane is well-
  26.         pattern  checker         ;  polished and has blue checkers.
  27.         colormap 2
  28.             0.0  0 0 0.2
  29.             1.0  0.8 0.9 1.0
  30.         diffuse  0.7
  31.         ambient  0.3
  32.         phong    0.6
  33.         reflect  0.45 0.49 0.6
  34.         transform:
  35.             scale 0.4 0.4 0.4
  36.         :end
  37.     :end
  38. :end
  39.  
  40.  
  41.  
  42. **
  43. **  The next part of the scene will feature a table
  44. **
  45.  
  46.  
  47. Deftexture:                      ; Next we will declare a default texture
  48.     pattern rings                ;  that looks like dark wood, which will
  49.     colormap 5                   ;  be used for the table.
  50.         0.0  0.6 0.4 0.0
  51.         0.4  0.5 0.3 0.0
  52.         0.5  0.3 0.1 0.0
  53.         0.6  0.5 0.2 0.0
  54.         1.0  0.6 0.4 0.0
  55.     diffuse 0.8
  56.     ambient 0.2
  57.     phong   0.4
  58.     phongsize 20
  59.     reflect 0 0 0
  60.     transform:
  61.         scale   0.04 0.04 0.04
  62.         rotate  50 0 10
  63.     :end
  64. :end
  65.  
  66.  
  67. BOX:
  68.     corners  -0.6 -1.0 0.8       ; Here is the top of the table.
  69.               0.6  1.0 0.86
  70. :end
  71.  
  72.  
  73. BOX:
  74.     corners  -0.03 -0.03 0.0     ; ...and here come the legs.
  75.               0.03  0.03 0.8
  76.     transform:
  77.         move  -0.52 -0.92 0.0
  78.     :end
  79. :end
  80.  
  81. BOX:
  82.     corners  -0.03 -0.03 0.0
  83.               0.03  0.03 0.8
  84.     transform:
  85.         move  0.52 -0.92 0.0
  86.     :end
  87. :end
  88.  
  89. BOX:
  90.     corners  -0.03 -0.03 0.0
  91.               0.03  0.03 0.8
  92.     transform:
  93.         move  -0.52 0.92 0.0
  94.     :end
  95. :end
  96.  
  97. BOX:
  98.     corners  -0.03 -0.03 0.0
  99.               0.03  0.03 0.8
  100.     transform:
  101.         move  0.52  0.92 0.0
  102.     :end
  103. :end
  104.  
  105.  
  106. Deftexture:
  107.     default                     ; Reset the default texture
  108. :end
  109.  
  110.  
  111.  
  112. **
  113. **  Somebody has left a ball on the floor
  114. **
  115.  
  116. SPHERE:
  117.     centre 0 0 0
  118.     radius 0.2
  119.     texture:
  120.         colormap 2
  121.             0.0  0 1 0
  122.             1.0  1 0 0
  123.         pattern checker
  124.         phong  0.7
  125.         phongsize 40
  126.         reflect 0.3 0.3 0.3
  127.         diffuse 0.6
  128.         ambient 0.4
  129.         transform:
  130.             rotate 40 20 0
  131.             move -0.3 -1.2 0.2
  132.         :end
  133.     :end
  134.     transform:
  135.         move -0.3 -1.2 0.2
  136.     :end
  137. :end
  138.  
  139.  
  140.  
  141. **
  142. **  And then we have the light-sources and the camera
  143. **
  144.  
  145. LIGHT:
  146.     location -3 -2 2            ; A white light-source is added
  147.     color     1 1 1
  148. :end
  149.  
  150.  
  151. CAMERA:
  152.     location  2 -3 1.4          ; And a camera is placed to
  153.     viewpoint 0 -0.4 0.5        ; look the table (use default aspect)
  154. :end
  155.